< previous page page_637 next page >

Page 637
Next, select the modules and forms you want to analyze. The default is to have all the files selected. You then choose the type of analysis that you want to perform from the Profile Type options:
Line Timing records how long it takes for single lines of code to execute.
Function Timing determines how long functions take to execute.
Line Hit Count counts the number of times each line of code is executed.
Function Hit Count counts how many times a function was executed.
Finally, click the Add Profiler Code button to add the profiler code to your project. At this point, if you view any of your code, you will see exactly what has been added by the Code Profiler (see Figure C.13). Notice that two lines of code were added for each line of code or function being analyzed.
12181-0637a.gif
Figure C.13.
The Visual Basic code editor showing the profiler code added to
analyze your project's performance.
Now, run your application and exercise the functions that you want to test. After you stop your application, you can view the output of the profiler by viewing the results in the analysis grid (see Figure C.14). The columns that appear in the grid depend on which Profile Type you selected. Table C.1 lists all the possible columns the grid can display.

 
< previous page page_637 next page >

If you like this book, buy it!